<%-- 
    Document   : Reportes
    Created on : Jan 24, 2012, 9:09:37 AM
    Author     : Carlos
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <%@page import="logica.ControlBebe" %>
        <%@page import="Modelo.*" %>
        <%@page import="java.util.*" %>
        <%@page import="java.lang.Exception" %>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Reportes</title>
        <style type="text/css">
            body
            {
                margin: 0px;
            }
            #tope
            {
                background-color: #029dd5;
                width: 100%;
                height: 10px;
            }
            #Titulo
            {
                margin-top: 30px;
                margin-left: 30px;
            }
            #TituloClinica
            {
                font-size: 30pt;
                font-weight: 600;
                color: #238bb0;
                text-decoration: underline;
                margin-left: 10px;
                position: relative;
                top: -10px;
                
            }
            #footer
            {
                position: absolute;
                bottom: 1px;
                background-image: url('IMG/footer.png');
                background-repeat: repeat-x;
                background-color: #029dd5;
                background-position: top;
                width: 100%;
                height: 65px;
            }
            input
            {
                display: block;
                width: 200px;
                border-color: #238bb0;
            }
            select
            {
                width: 200px;
                border-color: #238bb0;
            }
            a
            {
                font-size: 20pt;
                font-weight: 300;
                color: #238bb0;
                text-decoration: none;
                margin-left: 40px;
                position: absolute;
                bottom: 90px; 
            }
            a:hover
            {
                font-weight: 600;
                text-decoration: underline;
            }
            label
            {
                display: block;
                padding-top: 8px;
                padding-bottom: 2px;
                font-family: cursive;
                font-style: normal;
                font-variant: normal;
                font-weight: normal;
                font-size: medium;
                line-height: 120%;
                word-spacing: normal;
                letter-spacing: normal;
                text-decoration: none;
                text-transform: none;
                text-align: left;
                text-indent: 0ex;
                color: #238bb0;
            }
            #Seleccion
            {
                margin-top: 50px;
                margin-left: 40%;
            }
            .titulos
            {
                font-weight: 800;
                font-family: cursive;
                font-style: normal;
            }
            .titulos2
            {
                font-weight: 800;
                font-family: cursive;
                font-style: normal;
                margin-left: 250px;
                color: #6D929B;
            }
            td
            {
                margin-left: 10px;
                margin-right: 10px;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
            }
            table
            {
                border-left: 1px solid #008B8B;
                border-top: 1px solid #C1DAD7;
            }
            td {
                border-right: 1px solid #008B8B;
                border-bottom: 1px solid #C1DAD7;
                background: #fff;
                padding: 6px 6px 6px 12px;
                color: #6D929B;
                text-align: center;
            }
            td.alt {
                background: #F5FAFA;
                color: #B4AA9D;
            }
            #Reporte
            {
                margin-left: 20%;
                margin-top: 20px;
            }
            
        </style>
        <script src="js/jquery-1.7.1.min.js"></script>
        <script src="js/jquery-ui-1.8.17.custom.min.js"></script>
        <script>
            function BuscarReporte(){
                seleccion = $('#paciente').val();
                if (seleccion != 0){
                    $.post('GenerarReporte.jsp',{id:seleccion},function(data){
                        $('#Reporte').html(data);
                    } )
             }
            }
        </script>
    </head>
    <body>
                <div id="tope"></div>
        <div id="Titulo"><img src="IMG/Icon.png" width="50" height="50" lang="Clinica"/><span id="TituloClinica">Clínicas Unidas de Venezuela</span></div>
        <div id="Seleccion">
            <label for="paciente">Paciente:</label><select id="paciente" name="paciente" onchange="BuscarReporte();" >
                    <option value="0">Seleccionar</option>
            <%
                ControlBebe MiControlador = new ControlBebe();
                try{
                List<Bebe> Lista = MiControlador.getListaBebe();

                for (Bebe val: Lista ){
                    out.println("<option value='"+val.getId()+"'>"+val.getNombre()+" "+val.getApellido()+" ["+val.getCi_padre()+"]"+"</option>");
                }
                               }catch(Exception e){
                                   out.println("<option value='1'> Error </option>");
                               }

                           %></select>
            
        </div>
        <div id="Reporte"></div>
        <div id="footer"></div>
        <a href="Entrada.jsp" id="Atras"> << Atras</a>
    </body>
</html>
